package cn.huiyunche.base.service.enums;

/**
 * @ClassName: CSOrderStatusEnum
 * @Description: 服务订单流程状态
 * @author: Aaron
 * @date: 2016年9月3日 下午12:53:01
 */
public enum SServiceOrderStatusEnum {
    //	WAIT_RECEIVE(10, "待接单"),
//	CONFIRMED(30, "待支付"),
//	IN_TRANSIT(40, "执行中"),
    WAIT_DISPATCH(45, "待调度"),
    WAIT_EXTRACT(50, "待提车"),
    HAVE_EXTRACTED(60, "已提车"),
    HAVE_ISSUSD(70, "已发车"),
    HAVE_DELIVERY(80, "已交车"),
    DONE(90, "已完成"),
    CANCELED(100, "已取消");

    private final int value;
    private final String text;

    SServiceOrderStatusEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static SServiceOrderStatusEnum getByValue(int value) {
        for (SServiceOrderStatusEnum temp : SServiceOrderStatusEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
